package controllers
/*********************************************************/
/************本文档中的程序用于反馈*************/
/*********************version:1.0*************************/
/****Copyright (c) 2014年 许剑华. All rights reserved******/
/*********************************************************/
import (
	//"encoding/json"
	"github.com/astaxie/beego"
	."smart_home/lib"
	//"github.com/astaxie/beego/validation"
	"fmt"

)


type FeedBackController struct {
	beego.Controller
}
func (this *FeedBackController) FeedBackMsg() {
	admin_email :=beego.AppConfig.String("admin_permission")
	feed_msg := this.GetString("FeedbackMsg")
	fmt.Println("feed_msg",feed_msg)
	email := NewEmail(admin_email, "用户反馈的信息",feed_msg)

	err := SendEmail(email)

	fmt.Println(err)
	var resp_data FeedBackRespType
	resp_data.RespCode = 0
	resp_data.Status =""
	this.Data["json"] = &resp_data
	this.ServeJson();
	return
}
